package com.rpc.dubboRpcError.consumer;


import com.rpc.dubboRpcError.netty.NettyClient;
import com.rpc.dubboRpcError.pbulicInterface.HelloService;

import java.util.concurrent.locks.ReentrantLock;

/**
 * @author 何章怀晓 hezhanghuaixiao
 * @version V1.0
 * @desc
 */
public class ClientBootStrap {

  public static void main(String[] args) {
    //创建消费者

    NettyClient customer = new NettyClient();

    try {
      //获取代理对象
      HelloService helloService = (HelloService) customer.getBean(HelloService.class);

      String result = helloService.hello("101");

      System.out.println("客户端调用服务器后返回的结果：" + result);
      ReentrantLock lock = new ReentrantLock();
      //Thread.activeCount()
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

}
